var config = {
	"title":"快速报修",
	"layout":{
		"children":[
			{
			"key":"mi-group",
			"field":["mi-group"],
			"label":"基本信息",
			"component_type":"mi-group"
		},
			{
				"id":"input1",
				"field":["input11"],
				"label":"姓名",
				"disabled":0,
				"max_length":20,
				"show_label":1,
				"place_holder":"请输入用户名",
				"component_type":"mi-input"
			},
			{
				"id":"input1",
				"field":["input11"],
				"label":"姓名",
				"disabled":0,
				"max_length":20,
				"show_label":1,
				"place_holder":"请输入用户名",
				"component_type":"mi-text"
			},
			{
				"id":"input2",
				"field":["input2"],
				"label":"年龄",
				"readonly":0,
				"place_holder":"请输入地点",
				"component_type":"mi-input1"
			},
			{
				"id":"input2",
				"align":"right",
				"field":["input2"],
				"label":"地点",
				"place_holder":"请输入地点",
				"component_type":"mi-text1"
			},
			{
				"id":"input3",
				"rows":10,
				"align":"right",
				"field":["input3"],
				"label":"电话",
				"max_length":100,
				"show_label":1,
				"place_holder":"多行文本",
				"component_type":"mi-textarea1"
			},
			{
				"id":"input3",
				"align":"right",
				"field":["input3"],
				"label":"电话",
				"show_label":1,
				"place_holder":"请输入电话",
				"component_type":"mi-input-tel1"
			},
			{
				"id":"input_number",
				"max":20,
				"min":-20,
				"step":2,
				"field":["input_number"],
				"label":"数字",
				"disabled":0,
				"readonly":0,
				"new_group":1,
				"show_label":1,
				"place_holder":"请输入数字",
				"component_type":"mi-input-number"
			},
			{
				"key":"province",
				"field":["province"],
				"label":"省份",
				"event_key":"province_list",
				"show_label":1,
				"component_type":"mi-select"
			},
			{
				"key":"city",
				"field":["city"],
				"label":"市区",
				"event_key":"city_list",
				"show_label":1,
				"component_type":"mi-select",
				"default_select_index1":2
			},
			{
				"key":"switch",
				"field":["switch"],
				"label":"switch",
				"show_label":1,
				"true_value":1,
				"false_value":0,
				"component_type":"mi-switch"
			},
			{
				"key":"radio",
				"field":["radio"],
				"label":"单选按钮",
				"event_key":"yesno_list",
				"show_label":1,
				"component_type":"mi-radio-group"
			},
			{
				"id":"datepicker",
				"type":"year",
				"field":["datepicker"],
				"label":"date",
				"is_now":1,
				"disabled":0,
				"component_type":"mi-datepicker",
				"value_datatype":"string"
			},
			{
				"id":"datetime",
				"field":["datetime"],
				"label":"datetime",
				"format":"YYYY-MM-DD HH:mm",
				"is_now":1,
				"disabled":0,
				"component_type":"mi-datetime",
				"value_datatype":"string"
			},
			{
				"id":"time",
				"field":["time"],
				"label":"time",
				"is_now":0,
				"disabled":0,
				"component_type":"mi-time",
				"value_datatype":"number"
			}]
	},
	"options":{
		"buttons_max":5,//底部按钮最大显示数 多出来的在右边显示更多 点击之后从底部弹出
		"label_width":4,//label的宽度 2-7可选
		"reset_label":"重置",
		"submit_label":"提交",
		"footer_button": [//除了重置和提交为固定操作外 可以配置此字段来自定义按钮及操作 请求接口或者打开页面 并且可以根据条件控制按钮的显示与否
			{
				"api": {
					"url": "/sws/wdw",
					"params": [
						{
							"key": "a",
							"field": "customer_name"
						},
						{
							"key": "b",
							"value": -1
						}
					]
				},
				"label": "设为故障",
				"visible": "{{customer_id}}==9",//根据条件控制按钮显示
				"action_type": 0,//0|1   0 请求接口  1打开页面
				"confirm_msg": "确定设为故障？"//如果为请求接口时 弹出确认框中的文字 点击确定才会请求接口
			},
			{
				"api": {
					"url": "/create?_fc=customer_quickly1&keyword={{customer_name}}"
				},
				"type": "primary",
				"label": "快速报修",
				"visible": "{{customer_id}}==3",
				"action_type": 1
			}
		],
		"show_go_update":0,//添加成功之后 是否显示去修改按钮
		"update_form_url":"/edit?_fc=user_edit&id={{id}}",//点击去修改按钮时跳转的链接
		"show_continue_add":0//添加成功之后 是否显示继续添加按钮
	},
	"actions":[
		{
			"id":"submit",//点击提交按钮时的api参数
			"api":{
				"url":"entity/create?_ec=test_user_entity",
				"params":[],
				"page_enable":0
			}
		}
	],
	"form_data":{
		"api":{//请求info的接口
			"url":"entity/info?_ec=test_user_entity",
			"params":[],
			"page_enable":0
		},
		"fields":[{
			"key":"time",
			"data_type":"number",
			"default_value":3600
		},
			{
				"key":"datepicker",
				"default_value1":"getDay(10)"
			},
			{
				"key":"input1",
				"default_value":"input1"
			},
			{
				"key":"input2",
				"default_value":"input2"
			},
			{
				"key":"input_int",
				"default_value":123
			},
			{
				"key":"province",
				"default_value":"530000"
			},
			{
				"key":"city",
				"default_value1":"530100"
			},
			{
				"key":"radio",
				"default_value":1
			}]
	},
	"datasources":[{
		"id":"add_repair",
		"api":{
			"url":"entity/create?_ec=order",
			"params":[{
				"key":"",
				"field":"files",
				"value":"",
				"data_type":"string"
			},
				{
					"key":"",
					"field":"customer_id",
					"value":"",
					"data_type":"int"
				},
				{
					"key":"",
					"field":"location_id",
					"value":"",
					"data_type":"int"
				},
				{
					"key":"",
					"field":"device_id",
					"value":"",
					"data_type":"int"
				},
				{
					"key":"",
					"field":"note",
					"value":"",
					"data_type":"string"
				}],
			"page_enable":0
		},
		"fields":[]
	},
		{
			"id":"query_customer",
			"api":{
				"url":"sql/query-all?_sc=wb_customer_list",
				"params":[],
				"page_enable":0
			},
			"fields":[{
				"name":"customer_name",
				"data_type":"string",
				"null_value":"",
				"default_value":""
			},
				{
					"name":"customer_id",
					"data_type":"int",
					"null_value":"",
					"default_value":""
				}]
		},
		{
			"id":"query_location",
			"api":{
				"url":"sql/query-all?_sc=query_device_location",
				"params":[{
					"key":"",
					"field":"customer_id",
					"value":"",
					"data_type":"int"
				}],
				"page_enable":0
			},
			"fields":[{
				"name":"location_name",
				"data_type":"string",
				"null_value":"",
				"default_value":""
			},
				{
					"name":"location_id",
					"data_type":"int",
					"null_value":"",
					"default_value":""
				}]
		},
		{
			"id":"province_list",
			"api":{
				"url":"sql/query-all?_sc=province_list",
				"params":[],
				"page_enable":0
			},
			"options":[{
				"code":"310000",
				"name":"上海"
			},
				{
					"code":"530000",
					"name":"云南省"
				}],
			"source_type":"option"
		},
		{
			"id":"yesno_list",
			"options":[{
				"code":0,
				"name":"否"
			},
				{
					"code":1,
					"name":"是"
				},
				{
					"code":-1,
					"name":"不限"
				}],
			"source_type":"option"
		},
		{
			"id":"city_list",
			"api":{
				"url":"sql/query-all?_sc=city_list",
				"params":[{
					"key":"parent_id",
					"field":"province",
					"data_type":"string"
				}],
				"page_enable":0
			},
			"source_type":"server"
		}]
}